/*
 * MainForm.java
 *
 * Created on May 13, 2011, 5:13 PM
 */

package ro.pub.cs.dfsa.client;

import java.io.File;
import java.util.List;
import javax.swing.DefaultListModel;
import javax.swing.JFileChooser;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import ro.pub.cs.dfsa.client.framework.RequestType;

/**
 *
 * @author  Narcis
 */
public class MainForm extends javax.swing.JFrame {
    
    private static final String STATUS_LIST = "Available files:";
    private static final String STATUS_UPLOAD = "Select a file for upload:";
    private static final String STATUS_DOWNLOAD = "Enter the name of the file to be downloaded:";
    private static final String STATUS_DELETE = "Enter the name of the file to be deleted:";
    
    private static final String STATUS_NOT_CONNECTED = "No connection established";
    private static final String STATUS_CONNECTING = "Connecting..";
    private static final String STATUS_CONNECTING_ERROR = "Unable to connect to server";
    private static final String STATUS_CONNECTED = "Connected to server";
    
    private static final String MENU_TEXT_CONNECT = "Connect to Server";
    private static final String MENU_TEXT_DISCONNECT = "Disconnect from Server";

    //New
    private static final String DELETE_FILE = "The file has been deleted";
    DFSAClient client;
    String selectedFile = "";
    //private boolean stillConnected = false;

    /** Creates new form MainForm */
    public MainForm() {
        initComponents();
        customInitComponents();
    }
    
    private void customInitComponents() {
        jLabelStatusMessage.setText(STATUS_NOT_CONNECTED);
        
        jButtonDelete.setVisible(false);
        jButtonDownload.setVisible(false);
        jPanelDeleteDownload.setVisible(false);
        
        jButtonBrowse.setVisible(false);
        jButtonUpload.setVisible(false);
        jTextFieldUpload.setVisible(false);
        jPanelUpload.setVisible(false);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jListFiles = new javax.swing.JList();
        jLabelStatusMessage = new javax.swing.JLabel();
        jPanelConnect = new javax.swing.JPanel();
        jTextFieldServerAddress = new javax.swing.JTextField();
        jTextFieldServerPort = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jButtonConnectToServer = new javax.swing.JButton();
        jPanelUpload = new javax.swing.JPanel();
        jTextFieldUpload = new javax.swing.JTextField();
        jButtonBrowse = new javax.swing.JButton();
        jButtonUpload = new javax.swing.JButton();
        jPanelDeleteDownload = new javax.swing.JPanel();
        jButtonDelete = new javax.swing.JButton();
        jButtonDownload = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenuServer = new javax.swing.JMenu();
        jMenuItemConnectToServer = new javax.swing.JMenuItem();
        jMenuAction = new javax.swing.JMenu();
        jMenuItemList = new javax.swing.JMenuItem();
        jMenuItemUpload = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jListFiles.setModel(/*new javax.swing.AbstractListModel() {
            String[] strings = { };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
            */new DefaultListModel()
        );
        jListFiles.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jListFilesMouseClicked(evt);
            }
        });
        jListFiles.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                jListFilesValueChanged(evt);
            }
        });
        jScrollPane1.setViewportView(jListFiles);

        jLabelStatusMessage.setText("jLabel1");

        jPanelConnect.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jTextFieldServerAddress.setText("localhost");

        jTextFieldServerPort.setText("50001");

        jLabel1.setText("Adresa");

        jLabel2.setText("Port");

        jButtonConnectToServer.setText("Connect");
        jButtonConnectToServer.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButtonConnectToServerMouseClicked(evt);
            }
        });
        jButtonConnectToServer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonConnectToServerActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelConnectLayout = new javax.swing.GroupLayout(jPanelConnect);
        jPanelConnect.setLayout(jPanelConnectLayout);
        jPanelConnectLayout.setHorizontalGroup(
            jPanelConnectLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelConnectLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelConnectLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonConnectToServer, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanelConnectLayout.createSequentialGroup()
                        .addGroup(jPanelConnectLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanelConnectLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jTextFieldServerAddress)
                            .addComponent(jTextFieldServerPort, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))))
                .addContainerGap(92, Short.MAX_VALUE))
        );
        jPanelConnectLayout.setVerticalGroup(
            jPanelConnectLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelConnectLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelConnectLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jTextFieldServerAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelConnectLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jTextFieldServerPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButtonConnectToServer)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelUpload.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jTextFieldUpload.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldUploadActionPerformed(evt);
            }
        });

        jButtonBrowse.setText("Browse");
        jButtonBrowse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonBrowseActionPerformed(evt);
            }
        });

        jButtonUpload.setText("Upload");
        jButtonUpload.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonUploadActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelUploadLayout = new javax.swing.GroupLayout(jPanelUpload);
        jPanelUpload.setLayout(jPanelUploadLayout);
        jPanelUploadLayout.setHorizontalGroup(
            jPanelUploadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelUploadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelUploadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelUploadLayout.createSequentialGroup()
                        .addComponent(jTextFieldUpload, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonBrowse, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jButtonUpload, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(16, Short.MAX_VALUE))
        );
        jPanelUploadLayout.setVerticalGroup(
            jPanelUploadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelUploadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelUploadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldUpload, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonBrowse))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonUpload)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelDeleteDownload.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jButtonDelete.setText("Delete");
        jButtonDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDeleteActionPerformed(evt);
            }
        });

        jButtonDownload.setText("Download");
        jButtonDownload.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDownloadActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelDeleteDownloadLayout = new javax.swing.GroupLayout(jPanelDeleteDownload);
        jPanelDeleteDownload.setLayout(jPanelDeleteDownloadLayout);
        jPanelDeleteDownloadLayout.setHorizontalGroup(
            jPanelDeleteDownloadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDeleteDownloadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDeleteDownloadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelDeleteDownloadLayout.createSequentialGroup()
                        .addComponent(jButtonDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(179, 179, 179))
                    .addGroup(jPanelDeleteDownloadLayout.createSequentialGroup()
                        .addComponent(jButtonDownload)
                        .addContainerGap(163, Short.MAX_VALUE))))
        );
        jPanelDeleteDownloadLayout.setVerticalGroup(
            jPanelDeleteDownloadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDeleteDownloadLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButtonDelete)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonDownload)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jMenuServer.setText("Server");

        jMenuItemConnectToServer.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemConnectToServer.setText("Connect to Server");
        jMenuItemConnectToServer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemConnectToServerActionPerformed(evt);
            }
        });
        jMenuServer.add(jMenuItemConnectToServer);

        jMenuBar1.add(jMenuServer);

        jMenuAction.setText("Action");
        jMenuAction.setEnabled(false);

        jMenuItemList.setText("List");
        jMenuItemList.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemListActionPerformed(evt);
            }
        });
        jMenuAction.add(jMenuItemList);

        jMenuItemUpload.setText("Upload");
        jMenuItemUpload.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemUploadActionPerformed(evt);
            }
        });
        jMenuAction.add(jMenuItemUpload);

        jMenuBar1.add(jMenuAction);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabelStatusMessage, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(jPanelDeleteDownload, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanelConnect, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jPanelUpload, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelStatusMessage)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 398, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanelConnect, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(jPanelDeleteDownload, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jPanelUpload, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void populateFileList() {
        jButtonDelete.setVisible(true);
        jButtonDownload.setVisible(true);
        jPanelDeleteDownload.setVisible(true);
        
        jLabelStatusMessage.setText(STATUS_LIST);
        jListFiles.removeAll();

        jLabelStatusMessage.setText(STATUS_LIST);
        jListFiles.removeAll();
            
        client.setRequestType(RequestType.LIST);
        client.executeRequest();

        DefaultListModel model = (DefaultListModel ) jListFiles.getModel();
        model.clear();

        List<String> fileNames;
        while (true) {
            fileNames = client.getFileNames();

            if (fileNames == null || fileNames.size() == 0)
                break;

            for (String fileName : fileNames) {
                System.out.println(fileName);
                model.addElement(fileName);
             }
        }
    }
    
    private void jMenuItemListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemListActionPerformed
        populateFileList();
    }//GEN-LAST:event_jMenuItemListActionPerformed

    private void jMenuItemUploadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemUploadActionPerformed
        jLabelStatusMessage.setText(STATUS_UPLOAD);
        jButtonBrowse.setVisible(true);
        jButtonUpload.setVisible(true);
        jTextFieldUpload.setVisible(true);
        jPanelUpload.setVisible(true);
        
        client.setRequestType(RequestType.UPLOAD);
    }//GEN-LAST:event_jMenuItemUploadActionPerformed

    private void jButtonConnectToServerMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButtonConnectToServerMouseClicked
        
    }//GEN-LAST:event_jButtonConnectToServerMouseClicked

    private void jMenuItemConnectToServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemConnectToServerActionPerformed
        if (jMenuAction.getText().equals(MENU_TEXT_CONNECT)) {
            
        }
        else {
            jLabelStatusMessage.setText(STATUS_NOT_CONNECTED);
            jMenuAction.setEnabled(false);
            jMenuItemConnectToServer.setText(MENU_TEXT_CONNECT);
            
            client.closeConnection();
        }
    }//GEN-LAST:event_jMenuItemConnectToServerActionPerformed

    private void jListFilesValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jListFilesValueChanged
        if (!evt.getValueIsAdjusting()){
            //System.out.println(jListFiles.getSelectedValue().toString());
            

        }
    }//GEN-LAST:event_jListFilesValueChanged

    private void jButtonDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeleteActionPerformed
        System.out.println("I shall delete " + selectedFile);

        jLabelStatusMessage.setText(DELETE_FILE);

        client.setRequestType(RequestType.DELETE);
        client.setFileName(selectedFile);
        client.executeRequest();
        
        populateFileList();
}//GEN-LAST:event_jButtonDeleteActionPerformed

    private void jListFilesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jListFilesMouseClicked
        // TODO add your handling code here:
        if (jListFiles.getSelectedValue() != null)
            selectedFile = jListFiles.getSelectedValue().toString();
    }//GEN-LAST:event_jListFilesMouseClicked

    private void jButtonBrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseActionPerformed
        // TODO add your handling code here:
        final JFileChooser jFileChooser1 = new JFileChooser();
        jFileChooser1.showOpenDialog(this.getContentPane());
        jTextFieldUpload.setText(jFileChooser1.getSelectedFile().toString());

}//GEN-LAST:event_jButtonBrowseActionPerformed

    private void jTextFieldUploadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldUploadActionPerformed

}//GEN-LAST:event_jTextFieldUploadActionPerformed

    private void jButtonUploadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonUploadActionPerformed
        String completeFileName = jTextFieldUpload.getText();
        
        client.setRequestType(RequestType.UPLOAD);
        client.setFileName(completeFileName);
        client.executeRequest();
        
        populateFileList();
}//GEN-LAST:event_jButtonUploadActionPerformed

    private void jButtonDownloadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDownloadActionPerformed
        client.setRequestType(RequestType.DOWNLOAD);
        client.setFileName(selectedFile);
        client.executeRequest();
}//GEN-LAST:event_jButtonDownloadActionPerformed

    private void jButtonConnectToServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonConnectToServerActionPerformed
        jLabelStatusMessage.setText(STATUS_CONNECTING);
        
        try {
            int serverPort = Integer.valueOf(jTextFieldServerPort.getText());
            String serverAddress = jTextFieldServerAddress.getText();
            
            client = new DFSAClient(1, serverAddress, serverPort);
            //stillConnected = true;
            
        } catch (Exception e) { }
        
        if (client != null && client.isConnected()) {
            jLabelStatusMessage.setText(STATUS_CONNECTED);
            jMenuItemConnectToServer.setText(MENU_TEXT_DISCONNECT);
            
            jMenuAction.setEnabled(true);
        }
        else {
            jLabelStatusMessage.setText(STATUS_CONNECTING_ERROR);
            jMenuItemConnectToServer.setText(MENU_TEXT_CONNECT);
            
            client = null;
            jMenuAction.setEnabled(false);
        }
    }//GEN-LAST:event_jButtonConnectToServerActionPerformed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainForm().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonBrowse;
    private javax.swing.JButton jButtonConnectToServer;
    private javax.swing.JButton jButtonDelete;
    private javax.swing.JButton jButtonDownload;
    private javax.swing.JButton jButtonUpload;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabelStatusMessage;
    private javax.swing.JList jListFiles;
    private javax.swing.JMenu jMenuAction;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItemConnectToServer;
    private javax.swing.JMenuItem jMenuItemList;
    private javax.swing.JMenuItem jMenuItemUpload;
    private javax.swing.JMenu jMenuServer;
    private javax.swing.JPanel jPanelConnect;
    private javax.swing.JPanel jPanelDeleteDownload;
    private javax.swing.JPanel jPanelUpload;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextField jTextFieldServerAddress;
    private javax.swing.JTextField jTextFieldServerPort;
    private javax.swing.JTextField jTextFieldUpload;
    // End of variables declaration//GEN-END:variables
    
}
